Rust: Add Scoped Main-Turn Interruption - #2015
Conversation
Generate the typed session.interruptMainTurn RPC surface, expose Session::interrupt_main_turn with explicit options and result, and track SessionCapabilities.interrupt_main_turn across create and capabilities.changed snapshots. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2704b44e-61a0-4b2f-952b-befba7f5c813
|
Deduplication note: #2014 is the canonical SDK integration PR and owns ongoing review/maintenance. This draft is temporarily frozen as the final-runtime-head codegen reference. Its generated |
|
Canonical SDK lane. Please preserve this PR’s final-head generated event schema and |
Transfer the stronger wire, error, capability, typed-event, and queue-semantics coverage from superseded PR github#2014 while preserving the final-runtime-head generated schema and conventional high-level API. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 52417727-d5b4-482e-8391-0011d0984a5d
|
Initial canonical parity transfer is complete at Evidence:
The runtime gate is still closed: github/copilot-agent-runtime#12968 remains open at required head Maintainer action requested after the publication gate opens: the author account has repository |
|
Runtime integration update: github/copilot-agent-runtime#12968 is now conflict-free at exact head |
|
Runtime release-gate update: the exact required containing head is now |
|
Runtime release-gate update: exact required head is now |
|
Since the runtime feature hasn't merged 3 weeks later, I'll treat this as stale and close it. Please feel free to reopen if this is still actively being pursued. Also if we do this we'll need to do it across all SDK languages, not only Rust. Hope this is OK. |
Summary
Canonical Rust SDK consumer lane for github/copilot-agent-runtime#12968 and github/github-app#8664:
InterruptMainTurnOptions { flush_queued: bool }with builder APIsession.interruptMainTurnRPC andInterruptMainTurnRequest/InterruptMainTurnResultSessionCapabilities::interrupt_main_turn: Option<bool>on create/resume snapshotsCapabilitiesChangedData::interrupt_main_turn: Option<bool>event payloadcapabilities.changedsnapshots replace the capability cache wholesale by final runtime contractSession::abort; unsupported or old runtimes surface JSON-RPC MethodNotFoundParity coverage
Transferred the valuable docs/tests from superseded #2014 while preserving this PR's final-head generated files:
flushQueuedomission throughsession.rpc().interrupt_main_turn(InterruptMainTurnRequest::default())flushQueued: false; builder serializestrueinterrupted: trueandfalse-32601propagation with proof that nosession.abortfollowstrue, resume/unsupportedfalse, old omissionNoneevent.typed_data::<CapabilitiesChangedData>()Runtime dependency
Originally generated from the feature schemas at runtime commit
9391d2e781b23fc1ebcbd5b4605f848afa40b7d0in github/copilot-agent-runtime#12968. The runtime integrated current main at099e4e1ec7548427a58605929d18c668d5399118, fixed complete capability snapshots atc7f1c68d9d316c1294d338923b2609d6e2523141, then hardened attached-session scoping and canonical snapshot documentation at current head034a636b982daf15340778f0f1b92b9bf30454fc. Each prior head remains an ancestor. CLI 1.0.71 and current published@github/copilotpins do not contain this protocol.The containing-release gate must now track exact current runtime head
034a636b982daf15340778f0f1b92b9bf30454fc, not prior headsc7f1c68d9d,099e4e1ec7, or9391d2e781. Keep this PR draft until the first published CLI package containing the current head exists; then update package/version/hash pins through repository conventions and run canonical full codegen. The generated-files freshness check is expected to remain red until that publication gate opens.Validation
cargo +nightly-2026-04-14 fmt --checkcargo clippy --all-features --all-targets -- -D warningscargo test --all-features --test session_test(119 passed)GITHUB_ACTIONS=true cargo test --all-featuresRUSTDOCFLAGS='-D warnings' cargo doc --no-deps --all-features